<template>
  <div class="goods-desc">
    <h3 class="title">{{info.title}}</h3>
    <hr>
    <div class="content" v-html="info.content"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      info: {},
      id: this.$route.params.id
    };
  },
  methods: {
    getGoodsDesc() {
      this.$http.get("api/goods/getdesc/" + this.id).then(function(res) {
        if (res.body.status !== 0) {
          return;
        }
        this.info = res.body.message[0];
      });
    }
  },
  created() {
    this.getGoodsDesc();
  }
};
</script>   
<style lang="scss" scoped>
.goods-desc {
  padding: 0 8px;

  .title {
    color: #226aff;
    text-align: center;
    font-size: 16px;
    line-height: 30px;
  }
  .content {
    img {
      width: 100px;
    }
  }
}
</style>
